﻿ <Window x:Class="University.Workshop.Presentation.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="650" Width="auto" 
        xmlns:themes="clr-namespace:WPFThemes;assembly=WPFThemes"
         themes:ThemeManager.Theme="{Binding ElementName=themes, Path=SelectedItem}"
        Name="Principal">
    <Window.Resources>
        <Storyboard RepeatBehavior="Forever" x:Key="StoryApp" >
            <DoubleAnimation
                            Storyboard.TargetProperty="RenderTransform.Children[1].Y"
                            From="0" To="-53" Duration="0:0:0.5"  />
            <DoubleAnimation
                            Storyboard.TargetProperty="RenderTransform.Children[1].X"
                            From="5" To="0" Duration="0:0:0.5" />
            <DoubleAnimation
                            Storyboard.TargetProperty="RenderTransform.Children[0].Angle"
                            From="0" To="-45" Duration="0:0:0"  />
            <DoubleAnimation
                            Storyboard.TargetProperty="RenderTransform.Children[1].Y"
                            From="-53" To="0" Duration="0:0:0.5" BeginTime="0:0:0.5" />
            <DoubleAnimation
                            Storyboard.TargetProperty="RenderTransform.Children[1].X"
                            From="0" To="5" Duration="0:0:0.5" BeginTime="0:0:0.5" />
            <DoubleAnimation
                            Storyboard.TargetProperty="RenderTransform.Children[1].Y"
                            From="0" To="-53" Duration="0:0:0.5"  BeginTime="0:0:1"  />
            <DoubleAnimation
                            Storyboard.TargetProperty="RenderTransform.Children[0].Angle"
                            From="-45" To="0" Duration="0:0:0" BeginTime="0:0:1"  />
            <DoubleAnimation
                            Storyboard.TargetProperty="RenderTransform.Children[1].Y"
                            From="-53" To="0" Duration="0:0:0.5" BeginTime="0:0:1.5"   />


            <DoubleAnimation
                            Storyboard.TargetProperty="RenderTransform.Children[1].Y"
                            From="0" To="-53" Duration="0:0:0.5" BeginTime="0:0:2" />
            <DoubleAnimation
                            Storyboard.TargetProperty="RenderTransform.Children[1].X"
                            From="5" To="0" Duration="0:0:0.5" BeginTime="0:0:2" />
            <DoubleAnimation
                            Storyboard.TargetProperty="RenderTransform.Children[0].Angle"
                            From="0" To="45" Duration="0:0:0" BeginTime="0:0:2" />
            <DoubleAnimation
                            Storyboard.TargetProperty="RenderTransform.Children[1].Y"
                            From="-53" To="0" Duration="0:0:0.5" BeginTime="0:0:2.5" />
            <DoubleAnimation
                            Storyboard.TargetProperty="RenderTransform.Children[1].X"
                            From="0" To="5" Duration="0:0:0.5" BeginTime="0:0:2.5" />
            <!--<DoubleAnimation
                            Storyboard.TargetProperty="RenderTransform.(RotateTransform.Angle)"
                            From="0" To="-45" Duration="0:0:0.0"  />-->
            <!--<DoubleAnimation
                            Storyboard.TargetProperty="RenderTransform.(RotateTransform.Angle)"
                            From="-45" To="0" Duration="0:0:0.5" BeginTime="0:0:0.5" />
            <DoubleAnimation
                            Storyboard.TargetProperty="RenderTransform.(RotateTransform.Angle)"
                            From="0" To="45" Duration="0:0:0.5" BeginTime="0:0:1"  />
            <DoubleAnimation
                            Storyboard.TargetProperty="RenderTransform.(RotateTransform.Angle)"
                            From="45" To="0" Duration="0:0:0.5"  BeginTime="0:0:1.5"  />-->
        </Storyboard>
        <Style x:Key="IconAppStyle" TargetType="Image">
            <Style.Triggers>
                <EventTrigger RoutedEvent="Window.Loaded" >
                    <BeginStoryboard Storyboard="{StaticResource ResourceKey=StoryApp}" Name="Sto"   />
                </EventTrigger>
                <EventTrigger RoutedEvent="MouseEnter" >
                    <PauseStoryboard BeginStoryboardName="Sto"/>
                </EventTrigger>
                <EventTrigger RoutedEvent="MouseLeave" >
                    <ResumeStoryboard BeginStoryboardName="Sto"/>
                </EventTrigger>
            </Style.Triggers>
        </Style>
    </Window.Resources>
        <Grid Name="GrdPrincipal">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="235" Name="MenuGrid"/>
            <ColumnDefinition Width="4*" Name="ContentGrid"/>
        </Grid.ColumnDefinitions>

        <Grid Grid.Column="0" >
            <Grid.RowDefinitions>
                <RowDefinition Height="4*"/>
                <RowDefinition Height="1*"/>
            </Grid.RowDefinitions>
        
            <TreeView  HorizontalAlignment="Left" VerticalAlignment="Stretch" Width="235" Grid.Row="0" Grid.RowSpan="2" Name="menuTvi" TreeViewItem.Selected="TreeViewItem_Selected">
                <TreeViewItem Visibility="Hidden" Header="Usuarios" Name="Usuarios">
                    <TreeViewItem Header="Buscar" Selected="SearchUserSelected" Expanded="SearchUserSelected"></TreeViewItem>
                    <TreeViewItem Header="Registrar" Selected="RegisterUserSelected" Expanded="RegisterUserSelected"></TreeViewItem>
                    <TreeViewItem Header="Cambiar Contraseña" Selected="ChangePasswordUserSelected" Expanded="ChangePasswordUserSelected"></TreeViewItem>
                </TreeViewItem>
                <TreeViewItem Visibility="Hidden" Header="Kardex" Name="Kardex">
                    <TreeViewItem Header="Buscar" Selected="SearchKardexSelected" Expanded="SearchKardexSelected"></TreeViewItem>
                    <TreeViewItem Header="Registrar" Selected="RegisterKardexSelected" Expanded="RegisterKardexSelected"></TreeViewItem>
                </TreeViewItem>
                <TreeViewItem Visibility="Hidden" Header="Personas" Name="Personas">
                    <TreeViewItem Header="Buscar" Selected="SearchPersonSelected" Expanded="SearchPersonSelected"></TreeViewItem>
                </TreeViewItem>
                <TreeViewItem Visibility="Hidden" Header="Cisternas" Name="Cisternas">
                    <TreeViewItem Header="Buscar" Selected="SearchCisternSelected" Expanded="SearchCisternSelected"></TreeViewItem>
                    <TreeViewItem Header="Registrar" Selected="RegisterCisternSelected" Expanded="RegisterCisternSelected"></TreeViewItem>
                </TreeViewItem>
                <TreeViewItem Visibility="Hidden" Header="Manzano" Name="Manzanos">
                            <TreeViewItem Header="Registrar" Selected="RegisterSquareSelected" Expanded="RegisterSquareSelected"/>
                    <TreeViewItem Header="Buscar" Expanded="SearchSquareSelected" Selected="SearchSquareSelected"/>
                </TreeViewItem>
                <TreeViewItem Visibility="Hidden" Header="Egresos" Name="Egresos">
                    <TreeViewItem Header="Buscar" Selected="SearchExpenseSelected" Expanded="SearchExpenseSelected"></TreeViewItem>
                    <TreeViewItem Header="Registrar" Selected="RegisterExpenseSelected" Expanded="RegisterExpenseSelected"></TreeViewItem>
                </TreeViewItem>
                <TreeViewItem Visibility="Hidden" Header="Compra de Agua" Name="Compra">
                    <TreeViewItem Header="Buscar" Selected="SearchWaterPurchaseSelected" Expanded="SearchWaterPurchaseSelected"></TreeViewItem>
                    <TreeViewItem Header="Registrar" Selected="RegisterWaterPurchaseSelected" Expanded="RegisterWaterPurchaseSelected"></TreeViewItem>
                </TreeViewItem>
                <TreeViewItem Visibility="Hidden" Header="Lectura de Agua" Name="LecturaAgua">
                    <TreeViewItem Header="Cambiar Medidor" Selected="RegisterChangeWaterMeassure" Expanded="RegisterChangeWaterMeassure"></TreeViewItem>
                    <TreeViewItem Header="Lecturas Pendientes" Selected="PendingWaterReadings" Expanded="PendingWaterReadings"></TreeViewItem>
                </TreeViewItem>
                <TreeViewItem Visibility="Hidden" Header="Servicios" Name="Servicios">
                    <TreeViewItem Header="Corte"></TreeViewItem>
                    <TreeViewItem Header="Reconexion"></TreeViewItem>
                </TreeViewItem>
                <TreeViewItem Visibility="Hidden" Header="Configuraciones" Name="Configuraciones">
                    <TreeViewItem Header="Datos OTB">
                        <TreeViewItem Header="Registrar" Selected="RegisterOtbDataSelected"/>
                        <TreeViewItem Header="Modificar" Selected="ModifyOtbDataSelected" />
                        <TreeViewItem Header="Buscar" Selected="SearchOtbDataSelected"/>
                    </TreeViewItem>
                    <TreeViewItem Header="Tarifas">
                        <TreeViewItem Header="Registrar Nuevas" Selected="RegisterFeesAndFines"/>
                        <TreeViewItem Header="Modificar existentes" Selected="ModifyFeesAndFines"/>
                        <TreeViewItem Header="Buscar Anteriores" Selected="SearchFeesAndFines"/>
                    </TreeViewItem>
                    <TreeViewItem Header="BackUp" Selected="BackUpSelected" Expanded="BackUpSelected"/>
                    <TreeViewItem Header="Obtener IP" Selected="GetCurrentIp"/>
                    
                </TreeViewItem>
                <TreeViewItem Visibility="Hidden" Header="Cobros y Multas" Name="Cobro">
                    <TreeViewItem Header="Registrar Cobro" Selected="RegisterOtherCollectControl"></TreeViewItem>
                    <TreeViewItem Header="Registrar Multa" Selected="RegisterFineCollectColtrol"></TreeViewItem>
                    <TreeViewItem Header="Realizar Cobro" Selected="MakeCollectControlPending"></TreeViewItem>
                    <TreeViewItem Header="Historial Cobros" Selected="SearchCollectControlSelected"></TreeViewItem>
                </TreeViewItem>
                <TreeViewItem Visibility="Hidden" Header="Reportes Contables" Name="WaterForPeople">
                    <TreeViewItem Header="Buscar Ingreso" Selected="SearchIncomeSelected"></TreeViewItem>
                    <TreeViewItem Header="Buscar Egreso" Selected="SearchOutflowSelected"></TreeViewItem>
                    <TreeViewItem Header="Ingresos Vs Egresos" Selected="SearchIncomeVsOutflowSelected"></TreeViewItem>
                </TreeViewItem>
                <TreeViewItem Visibility="Hidden" Header="Activar Generador" Selected="ActivateGenerator" Name="ActivarGenerador"/>
                <TreeViewItem Visibility="Hidden" Header="Salir del Sistema" Name="Salir" Selected="SalirSelected" Expanded="SalirSelected"></TreeViewItem>
            </TreeView>
        </Grid>
        <Grid Grid.Column="1" Name="ContentPageGrid">
            <Grid.RowDefinitions>
                <RowDefinition Height="1*"/>
                <RowDefinition Height="14*"/>
            </Grid.RowDefinitions>
            <!--<Label Grid.Row="0" Name="OtbNameLbl" Content="" FontSize="24"/>-->
            <Viewbox Stretch="Uniform" Grid.Row="0">
                <Rectangle Fill="#53000000" Height="36" HorizontalAlignment="Left" Margin="0,0,0,0" Name="rectangle1" Stroke="Black" VerticalAlignment="Top" Width="460"  />
            </Viewbox>
            <TextBlock FontSize="28" Name="OtbNameLbl" FontWeight="Bold" HorizontalAlignment="Center" Margin="0,0,0,0" TextWrapping="Wrap" Width="auto" Foreground="White"><TextBlock.Effect><DropShadowEffect BlurRadius="1" Color="White" Direction="260" Opacity="0.7" ShadowDepth="1" /></TextBlock.Effect> <Run Language="es-es" Text="" /></TextBlock>
            <Frame Grid.Row="1" Name="frmContent" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" NavigationUIVisibility="Hidden" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"/>
        </Grid>
        <!--<Frame Grid.Column="1" Name="frmContent" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" NavigationUIVisibility="Hidden" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"/>-->

        
    </Grid>
</Window>
